#include <iostream>
#include <map>


void test(std::string &key, std::string a) {
    key = a;
}

int main() {
    std::map<std::string, int> myMap = {
            {"a", 1},
            {"b", 2},
            {"c", 3},
    };
    std::string a1;
    test(a1, "1");
    myMap.insert({a1, 4});
    test(a1, "2");
    myMap.insert({a1, 5});
    std::cout << "C++11:" << std::endl;
    for (const auto &kv: myMap) {
        std::cout << kv.first << "=" << kv.second << "\n";
    }
    
    std::cout << "C++17:" << std::endl;
    for (const auto &[k, v]: myMap) {
        std::cout << k << "=" << v << "\n";
    }

    return 0;
}
